import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-02
 * Time:21:51
 */
public class TestDemo2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n=scanner.nextInt();
        int sum=0;
        int ret=1;
        for (int i = 1; i <= n; i++) {
            ret*=i;
            sum+=ret;
        }
        System.out.println(sum);
    }
}
